import {BaseRole} from "../BaseRole.js";
import {Tool} from "../../tools/Tool.js";

export class Role extends BaseRole{
    nickname = '';//角色昵称
    constructor() {
        super();
    }

    /**
     * 设置昵称
     * @param nickname
     */
    setNickname(nickname){
        this.nickname = this.compete +'_'+ (nickname?nickname:Tool.randomLetter(3));
        $(this.id).attr('nickname', this.nickname);
    }

}